<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ape51</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .wrap {
            font-size: 0;
            background: yellow;
        }

        .wrap span {}

        span.s1 {
            font-size: 40px;
            background: red;
        }

        span.s2 {
            font-size: 30px;
            background: blue;
        }

        span.s3 {
            font-size: 20px;
            background: pink;
        }

        span.s4 {
            font-size: 10px;
            background: #bfa;
        }
    </style>
</head>

<body>
    <div class="wrap">
        <span class="s1">hello world</span>
        <span class="s2">hello world</span>
        <span class="s3">hello world</span>
        <span class="s4">hello world</span>
        <span class="s2">hello world</span>
        <span class="s4">hello world</span>
        <span class="s3">hello world</span>
        <span class="s1">hello world</span>
        <span class="s2">hello world</span>
        <span class="s3">hello world</span>
        <span class="s3">hello world</span>
        <span class="s1">hello world</span>
        <span class="s4">hello world</span>
        <span class="s1">hello world</span>
        <span class="s2">hello world</span>
        <span class="s4">hello world</span>
    </div>
</body>

</html>